package com.wu.client.constant;

/**
 * @author Cousin
 * @date 2025/3/20
 * @Description
 */
public class RedisKeyConstant {
    public final static String NEW_ALBUM_LIST = "album:new";

    public final static String NEW_SONG_LIST = "song:new";

    public final static String FEATURED_ALBUM_LIST = "album:featured";

    public final static String FEATURED_ARTIST_LIST = "artist:featured";

    // like:type:id
    private final static String LIKES = "like:%s:%s";

    public static <T> String getLikesRedisKey(Integer type,T contentId) {
        return String.format(LIKES,type,contentId);
    }
    // user:like:type:userId
    private final static String USER_LIKES = "user:like:%s:%s";

    public static String getUserLikesRedisKey(Integer type,Long userId) {
        return String.format(LIKES,type,userId);
    }

    // fan:type:id
    private final static String FANS = "fan:%s:%s";
    public static <T> String getFansRedisKey(Integer type,T userId) {
        return String.format(FANS,type,userId);
    }
}
